package com.example.administrator.ormlite_demoproject.db.bean;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * Created by Lzz on 9/5/2017.
 */

// 字段解析  http://blog.csdn.net/u013501637/article/details/52388802

@DatabaseTable(tableName = "tb_user_info")
public class UserInfo {

    @DatabaseField(generatedId = true)
    private int userId;

    @DatabaseField(columnName = "name")
    private String username;

    @DatabaseField(columnName = "addr",canBeNull = true)
    private String addr;

    @DatabaseField(columnName = "sex")
    private String sex;


    public UserInfo(){
        super();
    }

    public UserInfo(String username, String addr, String sex) {
        super();
        this.username = username;
        this.addr = addr;
        this.sex = sex;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", addr='" + addr + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }
}
